package com.slofzx.nuoda.evaluation.param.enums;

import com.slofzx.nuoda.common.config.Type;

public enum  AnalysisTypeEnum implements Type {
    POOL_TYPE("pool_type","油藏类型",1),
    REGION("region","大区",2),
    OFFICE("office","建设单位",3),
    AREA_MARK("area_mark","新老区",4),
    CAPACITY_TYPE("capacity_type","产能类型",5),

    ;

    /**
     * 标识
     */
    private String id;
    /**
     * 名称
     */
    private String name;
    /**
     * 排序值
     */
    private double sort;

    AnalysisTypeEnum(String id, String name, double sort) {
        this.id = id;
        this.name = name;
        this.sort = sort;
    }

    @Override
    public String getId() {
        return this.id;
    }

    @Override
    public String getName() {
        return this.name;
    }

    /**
     * 根据标识获取枚举值
     * @param id
     * @return
     */
    public static AnalysisTypeEnum getEnum(String id) {
        for(AnalysisTypeEnum item:values()) {
            if (item.getId().equals(id)) {
                return item;
            }
        }

        return null;
    }
}
